package _21define;

import java.util.Arrays;
import java.util.Comparator;

public class Sort {
    public static void main(String[] args) {
        String[] strings = {"Java", "Python", "C", "Scala", "JavaScript"};
        Arrays.sort (strings, Comparator.comparingInt(String::length));
        for (String str:strings){
            System.out.println(str);
        }
    }
}
